package com.liu.sx.entity;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 *  设备状态
 *
 */

@Entity
@Table(name = "t_pay")
@Getter
@Setter
@NoArgsConstructor
public class Pay {

    @Id
    private String id;

    private String address;

    private String sum; //充值累计金额

    private String subCost;//余额

    private String perCost; // 月租

    private String phone;// 充值号

    private String carNum;// 卡片序列号

    private String driverId; // 设备id

    @OneToMany(fetch = FetchType.EAGER,targetEntity = PayItem.class,mappedBy ="pay" )
    private List<PayItem> items = new ArrayList<>();




}
